package oschina.zhangchaozheng.demo.demo_1_2.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by zcz on 2017/6/28.
 */
@Controller
public class HelloController {

    @RequestMapping("/thymeleaf")
    public String thymeleaf(ModelMap map) {
        map.addAttribute("info", "Hello Thymeleaf!");
        return "thymeleaf";
    }

    @RequestMapping("/freemarker")
    public String freemarker(ModelMap map) {
        map.addAttribute("info", "Hello Freemarker!");
        return "freemarker";
    }
}
